<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("车辆列表")}</title>
<link href="/resources/css/common.css" rel="stylesheet" type="text/css" />
<link href="/resources/css/zTreeStyle.css" rel="stylesheet" type="text/css">
<link href="/resources/css/layout.css" rel="stylesheet" type="text/css" />
<link href="/resources/css/mmGrid.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/resources/js/reference/jquery.js"></script>
<script type="text/javascript" src="/resources/js/base/dialog.js"></script>
<script type="text/javascript" src="/resources/js/reference/jquery.validate.js"></script>
<script type="text/javascript" src="/resources/js/base/request.js"></script>
<script type="text/javascript" src="/resources/js/base/global.js"></script>
<script type="text/javascript" src="/resources/js/reference/mmGrid.js"></script>
<script type="text/javascript" src="/resources/plugin/datePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/resources/js/reference/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript">
function edit(id){
	parent.change_tab(0,'edit.jhtml?id='+id+'&isCheck=${isCheck}');
}
$().ready(function() {
	var $buildForm = $("#buildForm");
	var $member_id = $("#member_id");
	// 表单验证
	$buildForm.validate({
		rules: {
			memberIds: "required"
		},
		submitHandler: function(form) {
			form.submit();
		}
	});
	
	$("#selectStore").bindQueryBtn({
		type:'store',
		title:'${message("查询客户")}',
		url:'/member/store/select_store.jhtml'
	});
	
	//查询价格等级
	$("#selectMemberRank").bindQueryBtn({
		type:'memberRank',
		title:'${message("查询价格等级")}',
		url:'/basic/member_rank/select_memberRank.jhtml'
	});
	var cols = [
		{ title:'${message("终端设备编号")}', name:'terminal_num' ,align:'center',renderer:function(val,item,rowIndex){
			return '<a href="javascript:void(0);" onClick="edit('+item.id+')" class="red">'+val+'</a>';
		}},
		{ title:'${message("终端名称")}', name:'terminal_name' ,align:'center' },
		{ title:'${message("终端SIM卡号")}', name:'sim' ,align:'center' },
		{ title:'${message("终端设备类型")}', name:'type_value' ,align:'center' },
		{ title:'${message("终端设备型号")}', name:'model_value' ,align:'center' },
		{ title:'${message("备注")}', name:'remark' ,align:'center' },
		
	];
	
	var multiSelect = false;
	[#if multi==2]
		multiSelect = true;
	[/#if]
	$tmGrid = $('#table-m1').mmGrid({
		multiSelect:multiSelect,
		autoLoad: true,
		fullWidthRows:true,
		checkByClickTd:true,
		rowCursorPointer:true,
        cols: cols,
        url: 'select_list_data.jhtml',
        params:function(){
        	return $("#listForm").serializeObject();
        },
		plugins : [
            $('#paginator').mmPaginator()
        ]
    });
    
    
});


function childMethod(){
   return $tmGrid.selectedRows();
};
</script>
</head>
<body>
	<form id="listForm" action="list.jhtml" method="get">
	<input type="hidden"  name="saleOrgId" value ="${saleOrgId}" />
		<div class="bar">
			<div class="buttonWrap">
		</div>
		<div class="search-btn">
			<a href="javascript:;" id="searchBtn" class="iconButton">${message("1004")}</a>
		</div>
		<div id="searchDiv">
			 <div id="search-content" >
			 	<!--
			 	<dl>
					<dt><p>${message("机构名称")}:</p></dt>
					<dd>
						<input type="hidden" id="saleOrgId" name="saleOrgId"  class="text" value="" />
						<input type="text"  class="text" id="saleOrgName" value="" readyOnly/>
					</dd>
				</dl>
				-->
			 	
        		<dl>
    				<dt ><p>终端设备编号:</p></dt>
	    			<dd >
	    				<input type="text" class="text" id="terminalNum" name="terminalNum"  btn-fun="clear"/>
	    			</dd>
	    		</dl>
	    		<dl>
				<dt ><p>终端名称:</p></dt>
    			<dd >
    				<input type="text" class="text" id="terminalName" name="terminalName"  btn-fun="clear"/>
    			</dd>
	    		</dl>
	    		<dl>
	    			<dt><p>终端SIM卡号:</p></dt>
	    			<dd>
	    				<input type="text" class="text" id="sim" name="sim"  btn-fun="clear"/>
	    			</dd>
	    		</dl>
	    		<!--
	    		<dl>
        			<dt><p>${message("16015")}:</p></dt>
        			<dd class="date-wrap">
						<input id="startTime" name="startTime" class="text" value="" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd',startDate:'%y-%M-%d', maxDate: '#F{$dp.$D(\'endTime\')}'});" type="text" btn-fun="clear"/>
						<div class="fl">--</div>
						<input id="endTime" name="endTime" class="text" value="" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd',startDate:'%y-%M-%d', maxDate: '#F{$dp.$D(\'endTime\')}'});" type="text" btn-fun="clear"/>
					</dd>
        		</dl>
        		-->
        	</div>
		</div>
		<!--</div>-->
		<div class="table-responsive">
			<table id="table-m1"></table>
	    	<div id="body-paginator" style="text-align:left;">
	    		<div id="paginator"></div>
	   		</div>
		</div>
	</form>
</body>
</html>